package com.huicoo.forestmanager.ui.patrol.forestCampTask.contract;

import com.huicoo.forestmanager.base.BasePresenter;
import com.huicoo.forestmanager.network.bean.patrol.GetMyForestZoneBean;
import com.huicoo.forestmanager.network.bean.patrol.GetReportTimeSpanBean;
import com.huicoo.forestmanager.network.bean.patrol.PatrolEventEntity;
import com.huicoo.forestmanager.network.bean.patrol.PatrolTaskReportPositionBean;
import com.huicoo.forestmanager.network.bean.patrol.RecorddetailsBean;
import com.huicoo.forestmanager.network.bean.patrol.ReportPointEntity;
import com.huicoo.forestmanager.network.bean.patrol.StartPatrolBean;
import com.huicoo.forestmanager.network.bean.patrol.StopPatrolBean;

import java.util.HashMap;
import java.util.List;

import retrofit2.Call;

/**
 * --------- 日期 ------- 维护人 ------------ 变更内容 --------
 * 2019/4/8		    Administrator
 * 进行巡查任务
 */
public interface ForestCampTaskContract {
    interface View {
        void getMyForestZoneSuccess(GetMyForestZoneBean.GetMyForestZoneData Data);

        void refreshEvent(List<PatrolEventEntity> eventList);

        void getTaskDetailsSuccess(RecorddetailsBean.Data Data);

        void getReportTimeSpan(int during, double tolerance, double maxTolerance);

        void startTaskSuccess(StartPatrolBean.StartPatrolData Data);

        void reportPositionSuccess(ReportPointEntity entity);

        void stopTaskSuccess(boolean toReportRecord);

        void fail(String msg);
    }

    interface Presenter extends BasePresenter {
        void getMyForestZone(HashMap<String, String> params, boolean isOnlyRefreshEvent);

        void getTaskDetails(HashMap<String, String> params);

        void getReportTimeSpan(HashMap<String, String> params);

        void startTask(HashMap<String, String> params);

        void reportPosition(HashMap<String, String> params, ReportPointEntity entity);

        void stopTask(HashMap<String, String> params, boolean toReportRecord);
    }

    interface Model {
        Call<GetMyForestZoneBean> getMyForestZone(HashMap<String, String> params);

        Call<RecorddetailsBean> getTaskDetails(HashMap<String, String> params);

        Call<GetReportTimeSpanBean> getReportTimeSpan(HashMap<String, String> params);

        Call<StartPatrolBean> startTask(HashMap<String, String> params);

        Call<PatrolTaskReportPositionBean> reportPosition(HashMap<String, String> params);

        Call<StopPatrolBean> stopTask(HashMap<String, String> params);
    }
}
